home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / doom / server_1.zip / _KCKSCDR.QC < prev    next >
Text File  |  1996-10-04  |  2KB  |  72 lines

  1. /*
  2. **
  3. ** _kckscdr.qc (KickSuicider Code , 1.3)
  4. **
  5. ** Copyright (C) 1996 Johannes Plass
  6. ** 
  7. ** This program is free software; you can redistribute it and/or modify
  8. ** it under the terms of the GNU General Public License as published by
  9. ** the Free Software Foundation; either version 2 of the License, or
  10. ** (at your option) any later version.
  11. ** 
  12. ** This program is distributed in the hope that it will be useful,
  13. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. ** GNU General Public License for more details.
  16. **
  17. ** You should have received a copy of the GNU General Public License
  18. ** along with this program; if not, write to the Free Software
  19. ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. ** 
  21. ** Author:   Johannes Plass (plass@dipmza.physik.uni-mainz.de)
  22. **
  23. */
  24.  
  25. void(entity player) KickSuiciderInit =
  26. {
  27.    if (!USE_MODULE_KICKSUICIDER) return;
  28.    // nothing to be done here.
  29.    // player.kick_suicider_lasttime is initialized in 
  30.    // function PutClientInServer() in client.qc
  31. };
  32.  
  33. void(entity player) KickSuiciderInfo =
  34. {
  35.    local string limit;
  36.  
  37.    if (!USE_MODULE_KICKSUICIDER) return;
  38.  
  39.                // 123456789#123456789#123456789#12345678
  40.    sprint(player,"£");
  41.    sprint(player," KickSuicider");
  42.    sprint(player,              " kicks you if suiciding\n");
  43.    sprint(player,"  2 times within 2 minutes.\n");
  44. };
  45.  
  46. void(entity player) KickSuiciderActiveMessage =
  47. {
  48.    if (!USE_MODULE_KICKSUICIDER) return;
  49.                // 123456789#123456789#123456789#12345678
  50.    sprint(player,"  KickSuicider\n");
  51. };
  52.  
  53. float(entity player) KickSuicider =
  54. {
  55.    if (!USE_MODULE_KICKSUICIDER) return;
  56.  
  57.    if (time < player.kick_suicider_lasttime + 120) {
  58.       if (USE_MODULE_SERVERCONSOLE) {    //#jp#(ServerConsole)
  59.          dprint("Kicking ");        //#jp#(ServerConsole)
  60.          dprint(player.netname);    //#jp#(ServerConsole)
  61.          dprint(" for suiciding\n");    //#jp#(ServerConsole)
  62.       }                    //#jp#(ServerConsole)
  63.       sprint (player,"Suiciders suck, you are kicked.\n");
  64.       stuffcmd(player,"disconnect\n");
  65.       return(1);
  66.    }
  67.    player.kick_suicider_lasttime = time;
  68.    return(0);
  69. };
  70.  
  71.  
  72.